﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{-include file="`$__PHY_WEB``$__DIR_ADM`/block/meta.tpl"-}
<title>权限设定 - 后台</title>
</head>

<body>
<div class="sAll">

{-include file="`$__PHY_WEB``$__DIR_ADM`/block/header.tpl"-}
{-php-}include(__PHY_WEB.__DIR_ADM."/block/menu.php");{-/php-}
{-include file="`$__PHY_WEB``$__DIR_ADM`/block/menu.tpl" uL=$rNav-}

<div class="sL">
	<div class="sW main">
<!-- <main> -->
{- if $sMsg -}{- include file="`$__PHY_WEB``$__DIR_ADM`/block/message.tpl" -}{- /if -}

<style type="text/css">
<!--
.list { margin-right:20px; }
.edit { margin-right:20px; }
.list p,.edit p { font-weight:bold; }
.long {width:300px;}
-->
</style>
<div class="sL list">
	<p>给你的下属设定权限</p>
{-if $rUsers-}
	<table>
		<form method="post" action="?">
		<tr class="capt">
			<td>功能分组</td>
			<td>功能名称</td>
			<td align="right">
				<input type="hidden" name="user_id" value="{-$rNowUser.id-}" />
				<select onchange="location.href='?user_id='+this.value;">
					<option value="0">== 选择一个下属 ==</option>
{-section name=i loop=$rUsers-}
					<option value="{-$rUsers[i].id-}"{-if $rUsers[i].id==$rNowUser.id-} selected="selected"{-/if-}>
						{-$rUsers[i].user_ename|escape:html-} - {-$rUsers[i].user_cname|escape:html-}
					</option>
{-/section-}
				</select>
			</td>
		</tr>
{-section name=i loop=$rFuncs-}
		<tr>
			<td>{-$rFuncs[i].group_cname|escape:html-}</td>
			<td><a href="{-$rFuncs[i].func_ename-}">{-$rFuncs[i].func_cname|escape:html-}</a></td>
			<td align="right">
{-if $rFuncs[i].grantable-}
				<input type="radio" name="funcs[{-$rFuncs[i].id-}]" value="none"{-if !$rFuncs[i].level-} checked="checked"{-/if-} />不可使用
				<input type="radio" name="funcs[{-$rFuncs[i].id-}]" value="read"{-if 1==$rFuncs[i].level-} checked="checked"{-/if-} />只能浏览
				<input type="radio" name="funcs[{-$rFuncs[i].id-}]" value="write"{-if 3==$rFuncs[i].level-} checked="checked"{-/if-} />可以修改
				<input type="radio" name="funcs[{-$rFuncs[i].id-}]" value="grant"{-if 7==$rFuncs[i].level-} checked="checked"{-/if-} />下放权限
{-else-}
				<input type="radio"{-if !$rFuncs[i].level-} checked="checked"{-/if-} disabled="disabled" />不可使用
				<input type="radio"{-if 1==$rFuncs[i].level-} checked="checked"{-/if-} disabled="disabled" />只能浏览
				<input type="radio"{-if 3==$rFuncs[i].level-} checked="checked"{-/if-} disabled="disabled" />可以修改
				<input type="radio"{-if 7==$rFuncs[i].level-} checked="checked"{-/if-} disabled="disabled" />下放权限
{-/if-}
			</td>
		</tr>
{-/section-}
		<tr class="capt">
			<td>功能分组</td>
			<td>功能名称</td>
			<td align="right">
				<input type="submit" name="action" value="update" />
			</td>
		</tr>
		</form>
	</table>
{-else-}
	你没有下属。
{-/if-}
</div>

<!-- </main> -->
	</div>
</div>

{- include file="`$__PHY_WEB``$__DIR_ADM`/block/footer.tpl" -}

</div><!-- end all -->
</body>
</html>
